package com.newtouch.avmarketing.mgr.modules.avmarkrting.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.persistence.*;
import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@Entity
@Table(schema = "avmarketing",name = "branch")
public class Branch implements Serializable {

    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    @ApiModelProperty(value = "主键",example = "1",hidden = true)
    @Column(name="id")
    private Long id;

    @ApiModelProperty(value = "分公司代码")
    @Column(name="branch_code")
    private String branchCode;

    @ApiModelProperty(value = "分公司名称")
    @Column(name="branch_name")
    private String branchName;

    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    @ApiModelProperty(value = "中支公司代码")
    @Column(name="medium_code")
    private String mediumCode;

    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    @ApiModelProperty(value = "中支公司名称")
    @Column(name="medium_name")
    private String medium_name;

    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    @ApiModelProperty(value = "层级")
    @Column(name="level")
    private String level;
}
